import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';

//================================================================
// 获取摄像头设备列表 分页查询 /ITS/Camera/QueryPageList
export const CameraQueryPageList = (params?: object) => {
	return request({
		url: '/ITS/Camera/QueryPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 新增 /ITS/Camera/Add
export const CameraAdd = (params?: object) => {
	return request({
		url: '/ITS/Camera/Add',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 编辑 /ITS/Camera/Update
export const CameraUpdate = (params?: object) => {
	return request({
		url: '/ITS/Camera/Update',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 删除 /ITS/Camera/Delete
export const CameraDelete = (params?: object) => {
	return request({
		url: '/ITS/Camera/Delete',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 启用或禁用设备
export const OpenOrCloseCamera = (params?: object) => {
	return request({
		url: '/ITS/Camera/UpdateDeviceStatus',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//摄像头设备 详情
export const CameraDetail = (params?: object) => {
	return request({
		url: '/ITS/Camera/GetDetail',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//查询智能视图计算平台组织
export const TxIvcOrgQueryList = () => {
	return request({
		url: '/ITS/Camera/QueryOrganization',
		method: 'get',
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//查询设备可用服务节点
export const TxIvcUsableNodeQueryList = () => {
	return request({
		url: '/ITS/Camera/GetDeviceUsableNode',
		method: 'get',
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//摄像头设备 开流地址
export const GetDeviceStreamAddress = (params?: object) => {
	return request({
		url: '/ITS/Camera/GetDeviceStream',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}